<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
页面2
<button id="btnPre">上一页</button>
<button id="btnNext">上一页</button>
<a href="3.history-3.html">第三页</a>
</body>
<script>
    var btnPre = document.getElementById('btnPre');

    btnPre.onclick = function () {
        history.back();
    }

</script>
</html>